package basic.thread.student.better;

public class SetStudentThread implements Runnable {
	private Student student;
	private int x;

	public SetStudentThread(Student student) {
		this.student = student;
	}

	@Override
	public void run() {
		while (x < 20) {
			if (x % 2 == 0) {
				student.set("aa",21);
			}

			else {
				student.set("bb",20);
			}
			x++;

		}

	}

}
